#! /usr/bin/perl

#use strict;
use DBI;
use Socket;
use Net::Ping;
my $dbhost = "localhost";
my $dbdatabase = "ips";
my $dbuser = "root";
my $dbpass = "Ig0troot1";
my $dsn = "DBI:mysql:host=$dbhost;database=$dbdatabase";
my $dbh = DBI->connect ($dsn, $dbuser, $dbpass)
							or die "Connection error: $DBI::errstr ($DBI::err)\n";
print "Connected\n";

my $sth = $dbh->prepare ("SELECT ip FROM addresses");
$sth->execute();
my $count = 0;
foreach ($sth->fetchrow())
{
scan_ip(
}

sub scan_ip($ips){
}

$sth->finish();
$dbh->disconnect();
print "Disconnected\n";
exit(0);